#ifndef HEIGHTMAP_H
#define HEIGHTMAP_H

#define _CRT_SECURE_NO_WARNINGS
#define MAP_SIZE 1024
#define STEP_SIZE 16
#define HEIGHT_RATIO 1.5f

//#include <string>
#include "cg/cg.h"
#include <windows.h> // nao sei para que e que isto serve
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glu.h>

/*
HDC     hDC=NULL;
HGLRC       hRC=NULL;
HWND        hWnd=NULL;
HINSTANCE   hInstance;
*/
namespace PeanutQuest {

	class HeightMap : public cg::Entity,
		public cg::IDrawListener
	{
	private:
		int _materialDL;
		void makeMaterial();

	public:
		HeightMap();
		~HeightMap();
		
		void init();
		void draw();
		int height(BYTE *pHeightMap, int X, int Y);
		void setVertexColor(BYTE *pHeightMap, int x, int y);
		void renderHeightMap(BYTE pHeightMap[]);
	};
}

#endif